package com.zbcz.erp.viewmodel

class BusinessTripViewModel : BaseViewModel() {

//    private val mApi = RetrofitManager.getRetrofit()?.create(ErpApi::class.java)
//
//    var requestResult: MutableLiveData<Boolean?> = MutableLiveData()
//
//
//    //applyBean: BusinessApplyBean
//    fun createRequest(addBean: BusinessAddBean, file: File?) {
//        viewModelScope.launch {
//
//            withContext(Dispatchers.IO) {
//                if (file != null) {
//                    val uploadImageResult = uploadImageSuspend(file)
//                    Log.i(TAG, "uploadFileName=" + uploadImageResult.toString())
//                    addBean.file = uploadImageResult
//                }
//                val result = businessAdd(addBean)
//                Log.i(TAG, result.toString())
//                if (result != null) {
//                    val businessApplyBean = BusinessApplyBean().apply {
////                        tableId = result
//                        firstGateway = true
//                        id = result
//                        procDefId = addBean.procDefId ?: ""
//                        title = addBean.procDeTitle ?: ""
//                    }
//                    val applyResult = businessApply(businessApplyBean)
//                    requestResult.postValue(applyResult)
//                    Log.i(TAG, applyResult.toString())
//                }
//            }
//        }
//    }
}